home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / qed.doc < prev    next >
Text File  |  1995-03-31  |  39KB  |  898 lines

  1. (Comp.sources.hp48) 
  2. Item: 34 by lkv at mania.hotb.sub.org 
  3. Author: [Lutz Vieweg] 
  4.   Subj: v03i010:  qed - Machine Code Editor v1.07  [the REAL v1.07] 
  5.   Date: Tue Jan 07 1992 
  6.  
  7. [Note: It says "machine code editor" above, but QED doesn't edit machine code; 
  8. it's an object editor (like the built-in EDIT) written completely in very fast 
  9. machine code (unlike EDIT, which is written in slow RPL).  The documentation 
  10. below, at the author's request, is unretouched.  I hope that any possible 
  11. unclarities do not prevent you from trying out this impresive editor. 
  12.  
  13. Note #2: Pressing ON does not exit.  The "panic button" is shift-ENTER. 
  14. Like WordPerfect, this is a very powerful, very fast, and totally non-obvious 
  15. program that uses arcane keystroke sequences that must be learned, or you 
  16. can customize its keyboard with macros to your own taste.  It's worth the 
  17. effort to learn the contents of the following documentation!  -jkh-] 
  18.  
  19.  
  20. Hi! 
  21.  
  22. I was very surprised when I heard that QED 1.06 seemed to crash when 
  23. some libraries were installed. The reason for this is simple, but it is 
  24. not that easy to solve the problem. QED really needs absolute adresses 
  25. in RAM. But since it is no longer self-modifying, as it has been in 
  26. version 1.05, I needed to find a save location were to put the internal 
  27. variables. QED uses the PICT memory, which I guessed to reside in the 
  28. same place any time. But there are some libraries that moves the PICT 
  29. memory to a higher location - in general a few bytes only, but this 
  30. caused nasty crashes. The solution is not that elegant, but I think it 
  31. will prevent further trouble: QED uses now the highest possible 
  32. memory-range, and it checks wether this range is occupied by PICT or 
  33. not. So I managed to make QED work with all the libraries I tried - and 
  34. I hope it will not crash anymore... 
  35.  
  36. cu, Lutz Vieweg 
  37.  
  38. PLEASE READ THE QED.TXT FILE ENTIRELY! 
  39.  
  40. Included in this package: 
  41.  
  42. QED.DIR       a binary file (directory object) to be transmitted to the 
  43.               HP48sx, containing all QED related variables and programs 
  44.               (e.g. 3 different fonts) 
  45.  
  46. QEDSMALL.DIR  a binary file (directory object) to be transmitted to the 
  47.               HP48sx, containing only the 4 neccessary variables QED.o 
  48.               QED.font QED.env QED.keys - download this one for a first 
  49.               test... 
  50.  
  51. QED.DOC       QED's manual. If you are updating from a former release, 
  52.               please take a look at the "version history" in this 
  53.               manual. 
  54.  
  55. FONTSRC.COM   A self-extracting archive containing the source code for 
  56.               the fonts.  [Copy to another disk before running FONTSRC; 
  57.               the Goodies Disk is too full to run it in place.  -jkh-] 
  58.  
  59.  
  60. * ATTENTION: READ THE COPYRIGHT-NOTICE IF YOU HAVE * 
  61. *            AN UNLICENSED EVALUATION COPY         * 
  62.  
  63. +----------------------------------------------------+ 
  64. | Last changes made on 09-11-91              V 1.07  | 
  65. |                                                    | 
  66. |   ######   #######  #######                        | 
  67. |  #      #  #     #   #     #  The mega-speed       | 
  68. |  #      #  #         #     #  machinecode          | 
  69. |  #      #  #####     #     #  HP48sx Editor        | 
  70. |  #   #  #  #         #     #                       | 
  71. |  #    # #  #     #   #     #  (C)1991 Lutz Vieweg  | 
  72. |   ######   #######  #######                        | 
  73. |         #                                          | 
  74. +-----------------   Manual   -----------------------+ 
  75.  
  76. Please do not start QED until having read the whole manual. 
  77.  
  78. 0.0 Scusi... 
  79. ------------ 
  80.  
  81. Please excuse linguistic mistakes in this text. English is not 
  82. my native language. If you are not great at english, enjoy the 
  83. easy words that are used, if your native language is english, 
  84. think of what would be if you had to translate this text from 
  85. german... 
  86.  
  87. 0.1 The Project 
  88. --------------- 
  89.  
  90. When I bought my HP48sx it took only a few days to make me realize 
  91. how slow an operating-system can get if you spend no time on 
  92. optimizing time-critical routines. My feelings about this turned 
  93. from bad to ugly when I tried to edit larger programs or even 
  94. simple strings. I think it is a shame how the calculator makes 
  95. you wait just for scrolling a listing one line up. 
  96.  
  97. Before I bought the 48sx, I saw machine-language programmability 
  98. as a nice feature for a hand-held calculator - but later I knew 
  99. it is just neccessary. 
  100.  
  101. QED is my first large assembler-only project on the 48sx. I had 
  102. to program an assembler and disassembler before I felt able to 
  103. begin. By the time, CLASS and CLDIS raised their version number 
  104. rapidly due to the demands I encountered while programming QED. 
  105.  
  106. QED is ment to substitute HP's internal editor and to make editing 
  107. a lot more comfortable. 
  108.  
  109. 0.2 Copyright Notice 
  110. -------------------- 
  111.  
  112. QED was written by Lutz Vieweg 1991. 
  113. QED is "ShareWare" - you may spread the unlicensed evalution version 
  114.     to anyone as long as you... 
  115. - do not change any bit of the main program or documentation 
  116. - do not take money for it 
  117. - copy the whole package (all the files and documentation) 
  118.  
  119. You may use the unlicensed evaluation copy as long as you wish, but 
  120. it has one greater disadvantage: 
  121.  
  122. It quits automatically after 3 minutes run-time 
  123.  
  124. If you think that QED is worth a little bit of money to you, send 
  125. a letter with a ready adressed and stamped envelope plus a unique 
  126. price of only  
  127.  
  128.                 DM 10,-  or  US$ 8,- 
  129.  
  130. to my postal adress (see below). Add a 3.5' Disk or DM 1,- or US$ 1,- 
  131. and tell me wether I should format the disk MS-DOS/Atari- or Amiga- 
  132. conform. If you've got another computer, I can try to post 
  133. the program via EMail (FidoNet) or you may call me for a direct 
  134. serial transmission (HST, V32bis, V42bis). 
  135.  
  136. You will then get a registered QED owner, I will send you a unique 
  137. version without the limitations of the unlicensed evaluation copy. 
  138.  
  139. Whenever you see an update to QED coming around, you may send again 
  140. a letter as described above, but without the money (except for the 
  141. disk if neccessary), to me - you will get the lastest release. 
  142.  
  143. If you think you've got not the right connections to be informed of 
  144. a new release, send a second self-adressed envelope to me, I will 
  145. send it then to you as soon as a new release appeares. 
  146.  
  147. 0.3 Some words about machine-language programs... 
  148. ------------------------------------------------- 
  149.  
  150. HP does not encourage the typical HP48sx-user to program his 
  151. calculator in machine language. This is done for some 
  152. reasons, but the most important one may be that the 
  153. typical user wants his 48sx to work properly each and 
  154. every time, and not to lose memory contents at all. 
  155. The operating system of your 48sx has been tested for 
  156. hours, days and years, especially because the greater 
  157. part of it has been used in former calculators as well. 
  158. You may hardly be able to "crash" your 48sx using 
  159. the documented instructions, but you can get into 
  160. serious trouble when you leave this "child-safe" area 
  161. and play e.g. with SYSEVAL or Code Objects. 
  162.  
  163. I am not perfect, but I think I have the neccessary knowledge 
  164. to create well-working machine language programs on the 
  165. HP48sx. But I cannot guarantee that my programs never crash, 
  166. and therefore you have to use my programs at your own risk. 
  167. I did my best to write a bug-free program, but if it is 
  168. e.g. your financial ruin when you lose your memory contents, 
  169. you should think twice about using the product this 
  170. documentation is about. 
  171.  
  172. I CANNOT GIVE ANY WARRANTIES FOR THIS PROGRAM EXCEPT THAT 
  173. I DID NOT INCLUDE A VIRUS IN IT. 
  174.  
  175. I've tested QED with both a version A and version E 48sx. 
  176. It seems to work fine on both machines. 
  177.  
  178. 1.0 Installation 
  179. ---------------- 
  180.  
  181. To setup QED in your HP48sx take the following steps: 
  182.  
  183. - Transfer QED.dir to your hand-held using a KERMIT-program 
  184.   for example [or QEDSMALL.dir for a test drive]. 
  185.  
  186. - Invoke QED.o and enjoy... 
  187.  
  188. - Use KEYED to customize the keyboard usage of QED 
  189.  
  190. - Edit QED.env to customize various settings of QED 
  191.  
  192.  
  193. QED needs a few variables to run properly: QED.font, QED.env and 
  194. QED.keys. If you want to use QED in any directory, simply copy 
  195. these variables plus the main program, QED.o to your HOME directory. 
  196.  
  197. 1.1 Keyboard customization 
  198. -------------------------- 
  199.  
  200. QED reacts on keys similar to the OS. 
  201.  
  202. There are 45 "normal" keys, 2 "shifter" and the ALPHA key; the "ON" key 
  203. (wich is in fact just an interrupt button) is unused. 
  204.  
  205. Every normal key can be pressed without a shifter or with one 
  206. of them switched on or held down. This calculates to 135 possible 
  207. different keystrokes. Do not press more than one shifter or normal 
  208. key the same time - it will not be detected. 
  209.  
  210. The ALPHA key switches between normal and alpha-mode. A totally 
  211. independent key-list is held increasing the number of "different" 
  212. keys to 270. If you hold the ALPHA key down and then press 
  213. one or more keys, QED will return to the mode previously used 
  214. after releasing the ALPHA key. 
  215.  
  216. NOTICE: There is a little hardware-fault in the HP48sx:  
  217.         If you press the ALPHA key, the left shifter and 
  218.         on of the following keys, a wrong result will occur: 
  219.         "s", "7", "8", "9" 
  220.         The operating system covers this error by simply not 
  221.         allowing to press ALPHA and left shift together with 
  222.         a another key. 
  223.  
  224. There is a list of 300 strings (30 of them are unused) in the 
  225. normal HP48sx-format in a variable called 'QED.keys'. Each of 
  226. the 270 used strings tells QED how to react on a specific key-shifter 
  227. combination. Every byte except the ASCII code for "!" is treated 
  228. as a simple character which has to be set into the text. The 
  229. strings may consist of as many characters as you wish. E.g. if 
  230. you put "Gomorra" in the list as the string for the [EVAL] key, 
  231. you will see the 7 characters of this string put into the text 
  232. whenever you press the [EVAL] key. 
  233.  
  234. The exclamation mark has a special meaning. Whenever QED encounters 
  235. an "!" it will enter a "command-mode" - it will try to interpret 
  236. what follows to define a specific function that will then be 
  237. executed. If QED needs more codes, the "busy"-announciator will 
  238. blink until enough keys have been pressed. Sometimes, a prompt 
  239. will ask for specific data. 
  240. Here are a few examples of the function codes: 
  241.  
  242. "!"    - Enter command mode. If nothing follows, the busy- 
  243.          announciator will flash until enough codes have been 
  244.          typed to specify a command. 
  245.  
  246. "!!"   - Set an exclamation mark into the text. 
  247.  
  248. "!CL"  - Move cursor left. 
  249. "!CR"  - Move cursor left. 
  250. "!CU"  - Move cursor up. 
  251. "!CD"  - Move cursor down. 
  252.  
  253. For a complete list see chapter "Command Key Codes". 
  254.  
  255. You may combine normal characters and command key codes at will. 
  256.  
  257. The most simple way to change 'QED.keys' is to invoke 'KEYED' 
  258. wich is included in the package. This program will ask you 
  259. to press the key you want to change and then for the string definition. 
  260. To leave KEYED, press the "EXIT" menu key when asked for a definition. 
  261.  
  262. NOTICE: KEYED may sometimes "sleep" for a few seconds - be patient, 
  263.         and think of HP's "garbage collection" 
  264.  
  265. 1.2 Setting up the environment variable 
  266. --------------------------------------- 
  267.  
  268. The environment variable is a list that consists of various object. 
  269. You may change this variable, called 'QED.env', with the "VISIT" 
  270. function of your calculator or any other proper way. 
  271.  
  272. For a detailed description of the environment variable see chapter 
  273. "The Environtment Variable". 
  274.  
  275. 1.3 Using different character sets 
  276. ---------------------------------- 
  277.  
  278. The variable QED.font holds the font used by QED, or the 
  279. name of another variable, that holds the font. This font 
  280. contains not only the character-bitmap but also information 
  281. about the size of the font. 
  282.  
  283. Fonts may be of any size between 2*3 to 16*32 pixel. 
  284.  
  285. I will copy any font I have to anyone who is interested; if 
  286. you demand a special set of characters just do-it-yourself: 
  287. The sources for the fonts are included in the archive you 
  288. should have received - simply edit & assemble them. If you 
  289. do not feel like working with an assembler, you may post me 
  290. the edited source and a stamped back-envelope; I'll do it 
  291. for you. 
  292.  
  293. 1.4 Invoking the Editor 
  294. ----------------------- 
  295.  
  296. To start QED place the object you wish to edit on the top of the 
  297. stack, then press the VAR-menu-key which represents QED.o . 
  298.  
  299. Be sure to have 'QED.keys', 'QED.font' and 'QED.env' in the actual 
  300. directory or "above". 
  301.  
  302. If QED quits with an "insufficient memory" error, you know what you 
  303. are lacking... :-) 
  304.  
  305. If QED quits with an "undefined name" error, something with one 
  306. of the three variables (QED.env, QED.font, QED.keys) went wrong. 
  307.  
  308. If you edit a string-object, the output of the editor will be also 
  309. a string. If you edit other than string objects, QED will use 
  310. the ->STR function to convert the object to a string 
  311. (this may last a while, even at larger objects). 
  312. When you have finished editing, QED will use the STR-> function 
  313. to convert the edited string back into an object, except if you 
  314. used the "!QT" instruction to leave QED. 
  315.  
  316. 1.4.1 Using a startup-macro 
  317. --------------------------- 
  318.  
  319. Especially when you wish to call QED from your own programs, you 
  320. may want to specify a string of command-key-codes to be executed 
  321. directly after invocation. You can do this by setting bit 3 of 
  322. the startup-flags (in the QED.env variable). QED checks if 
  323. there's a string in level 2, and if so, it is interpreted just 
  324. like a string in the QED.keys variable, but only once at the 
  325. start. 
  326.  
  327. 1.4.2 Keeping the menu 
  328. ---------------------- 
  329.  
  330. You can tell QED to keep the menu actually displayed on the screen. 
  331. This is done by simply setting a bit in the environment variable. 
  332. Keeping the menu can be useful e.g. if you want to process the 
  333. edited variable depending on a return value. 
  334.  
  335. If you do not know yet how to display a menu from a running program, 
  336. here is an example: 
  337.  
  338. << { "DO" "SOME" "THING" "DIFFERENT" } TMENU # 3A1FCh SYSEVAL QED.o >> 
  339.  
  340. Notice: QED is just showing the same graphic at the menu-row as it was 
  341.         before, there's no special behaviour of the "menu-keys". You 
  342.         cannot directly call RPL-programs from the upper 6 keys as it 
  343.         is possible while normal calculator usage!  
  344.  
  345. - Look chapter 2.1 for the startup-flags  
  346.  
  347. 1.5 Leaving the Editor 
  348. ---------------------- 
  349.  
  350. To leave the editor you may use one of the command-key-codes 
  351. described below.  
  352.  
  353. NOTICE: You cannot cause an interrupt while QED is running. 
  354.         This has two important consequences: 
  355.         - Alarms will not occur during QED usage. They will 
  356.           come up after leaving. 
  357.         - Pressing the [ON] key, even together with others, 
  358.           will have no effect at all 
  359.         If, what heaven may prevent, your calculator "crashes" 
  360.         and "hangs up", you will have to press the reset-button 
  361.         of your calculator. You will find this button below 
  362.         one of the rubber-feet on the backside of your 48sx; 
  363.         use a needle or something like that to press down 
  364.         the button through the little hole. 
  365.         After pressing the reset-button, do the following: 
  366.         Press ON (calculator switches on and warm-starts). 
  367.         Press any key (calculator warm-starts again). 
  368.         Transmit QED from your original package to your 
  369.         calculator (NEVER run QED after a crash without 
  370.         having re-transmitted it!). 
  371.  
  372. QED quits automatically after no action has taken place for 
  373. the time specified in the QED.env variable. This is done 
  374. to save the batteries from being exhausted too far. If QED 
  375. is left this way, changes are made to the string in level 1. 
  376.  
  377. The unlicensed evaluation copy of QED will quit after a total 
  378. of about 3 minutes after invocation. 
  379.  
  380. 1.5.1 The return-values 
  381. ----------------------- 
  382.  
  383. You can tell QED to leave a return-value on the stack, a real number 
  384. from 0 to 99. This instruction is ment to make it more easy to you 
  385. to use QED from other programs. If you want to get the return value 0 
  386. even if no command key code caused such a value to be returned, you 
  387. may set bit 6 of the startup-flags. 
  388.  
  389. - Look chapter 2.0 for the command key codes and 2.1 for the startup- 
  390.   flags. 
  391.  
  392. You may also set a bit in the startup-flags to tell QED to leave the 
  393. last cursor position as a real-number on the stack. 
  394.  
  395. 1.6 QED as subroutine 
  396. --------------------- 
  397.  
  398. QED was definitively ment to become an often used sub-program as well 
  399. as a stand-alone editor. In the chapters above I discussed some 
  400. functions of QED that should give you the ability to use QED for 
  401. a large amount of tasks from your own programs. Here are some further 
  402. hints: 
  403.  
  404. QED seems really a little bit memory-expensive, but you'll find that 
  405. there are so many tools gaining advantage from QED usage, you 
  406. won't regret holding QED in your HOME directory. It's a good idea 
  407. to have one standard set of QED variables also in your HOME directory. 
  408. Theese variables should be used to setup your favourite object editor. 
  409. Patches for built-in functions like "VISIT" should be able to 
  410. use this environment. 
  411.  
  412. Other programs that want to use QED should have their own directory. In 
  413. this directory they can hold "their" environment. They can use the 
  414. same QED.o and QED.font from the HOME directory of course, but mostly 
  415. they will need their own QED.keys and QED.env variable. 
  416.  
  417. To change your favourite key-assignment as little as possible when 
  418. using such programs, they should contain a setup-routine, that takes 
  419. your QED.keys from the HOME directory, change the neccessary keys 
  420. and write the new QED.keys to the subdirectory of the program. 
  421.  
  422. This way may also save a lot of redundant bytes when spreading such 
  423. programs around... 
  424.  
  425. 2.0 Command key codes 
  426. --------------------- 
  427.  
  428. <.> has to be replaced by a string that is terminated with CHR$(0) 
  429. <x> has to be replaced by a hexadecimal value, terminated with CHR$(0) 
  430.  
  431. "!"    - Enter command mode. If nothing follows, the ALPHA- 
  432.          announciator will flash until enough codes have been 
  433.          typed to specify a command. 
  434.  
  435. "!!"   - Set an exclamation mark into the text. 
  436.  
  437. "!#<x> - Print the hexadecimal defined ASCII code. 
  438.  
  439. "!a<.> - Show alert with specified text. 
  440.  
  441. "!A"   - Shows some information about QED, e.g. the version number 
  442.  
  443. "!B"   - Backspace. Deletes the character to the left of the cursor 
  444.  
  445. "!bS"  - Set block start 
  446. "!bE"  - Set block end 
  447. "!bC"  - Copy block to actual position and to clip 
  448. "!bD"  - Copy block to clip, then delete it 
  449.  
  450. "!CL"  - Move cursor left. 
  451. "!CR"  - Move cursor right. 
  452. "!CU"  - Move cursor up. 
  453. "!CD"  - Move cursor down. 
  454.  
  455. "!CB"  - Move cursor to the beginning of the actual line 
  456. "!CE"  - Move cursor to the end of the actual line 
  457. "!Cb"  - Move cursor to the beginning of the text 
  458. "!Ce"  - Move cursor to the end of the text 
  459. "!CW"  - Move cursor to the beginning of the next word 
  460. "!Cw"  - Move cursor to the end of the word 
  461.  
  462. "!c"   - Clear the whole text. 
  463.  
  464. "!D"   - Delete. Deletes the character under the cursor. 
  465.  
  466. "!EN<.><.> - Normal search and replace (asks for Y/N/Q/G) 
  467. "!ET<.><.> - Turbo search and replace (Global by default) 
  468.  
  469. "!F<.>"- Search for a specified text, move cursor to the found position 
  470. "!f"   - Continue search 
  471.  
  472. "!I1"  - Import a text string from 
  473. ...      the specified stack level 
  474. "!I9"    ("!I1" imports the original text that is actually edited) 
  475.  
  476. "!j<x>"- Jump to specified location  
  477.  
  478. "!J0"  - Jump to one of the five marks  
  479. ...       
  480. "!J4" 
  481.  
  482. "!M0"  - Set one of the five marks 
  483. ...       
  484. "!M4"     
  485.  
  486. "!O"   - Switch overwrite/insert mode. 
  487.  
  488. "!P<x>-" - Move the pointer in the command-key-code string back a  
  489.            specified number of characters if status is OK. 
  490.            Every command leaves a status bit to indicate it's  
  491.            success or failure. Using this command you can create 
  492.            loops in macro strings to execute a set of instructions 
  493.            again if the status indicates no error. The status is 
  494.            negative e.g. even if you tried to move the cursor up a line 
  495.            and you were already in the first one. The offset <x> 
  496.            is calculated from the character following the "!P". 
  497.            Example: "!D!P4%-" A very stupid method to erase everything till 
  498.            the end.       ^This one stands for a CHR$(0) 
  499.            IMPORTANT: You can move the pointer only within ONE string. 
  500.                       If you try to jump to a location that is not in 
  501.                       the actual string, funny things may happen, but 
  502.                       QED will not crash. 
  503.  
  504. "!P<x>+" - This command will skip a specified number of characters 
  505.            following the "+". Usage like previous one. 
  506.            Example: "!PFFFF%+" will leave the actual command-key-code 
  507.            string if OK.   ^This one stands for a CHR$(0) 
  508.  
  509. "!p<x>-" - Similar to the previous one, this instruction will move the 
  510.            pointer in the actual command-key-code string. But it will 
  511.            affect the pointer only if the status is not O.K. 
  512.  
  513. "!p<x>+" - The same as the last one, but the new location is calculated  
  514.            by adding the offset to the location after the "+" 
  515.  
  516. "!QS"  - Quit QED and place edited object on stack 
  517. "!QN"  - Quit QED, but leave old object on stack (changes are lost!) 
  518.          "!QN" works slightly faster than "!QS" 
  519. "!QT"  - Quit QED, but do not compile the object if it has been 
  520.          not a string object already. 
  521.  
  522. "!R"   - EndOfLine and indent as actual line 
  523.  
  524. "!r00" - Return a real value (0 to 99) to the stack when quit.  
  525. ...      If this instruction is not used and also bit 6 of the 
  526. "!r99"   startup-flags is unset, no value is passed. 
  527.  
  528. "!S"   - Show status page 
  529.  
  530. "!s"   - Toggle sound on/off (see QED.env for default value) 
  531.  
  532. "!V"   - Switch ViewMode/CursorMode. In ViewMode, the ALERT- 
  533.          announciator is on. You may scroll around, but 
  534.          you cannot change the text. 
  535.  
  536. "!X<x>" - A simple format instruction. It will split lines larger 
  537.           than the given right border. It does not remove any EOL. 
  538.           Please be patient - this is not the fastest function. 
  539.  
  540. "!Y"   - Disable screen output  ; These two commands can save you a lot 
  541. "!y"   - Enable screen output   ; of time when using more complex macros 
  542.        ; Here is a "delete line" macro for example: "!Y!CB!bS!CD!bE!bD!y"  
  543.        ; IMPORTANT: This function can be "nested". If you switch off  
  544.        ; the output by "!Y!Y" you will need "!y!y" to switch it on again. 
  545.  
  546. "!Z"   - Refresh screen 
  547.  
  548. 2.1 The Environment Variable 
  549. ---------------------------- 
  550.  
  551. You may cut the following text and transmit it to the 48sx 
  552. as an ASCII-type file for 'QED.env' 
  553.  
  554. %%HP: T(3)A(R)F(.); 
  555. @ type    range         function 
  556. @ binary  #0-#FFFFFFFFh startup-flags: 
  557. @ Bit Value   Function 
  558. @  0    1h    If set, ViewMode is selected from start 
  559. @  1    2h    If set, OverwriteMode is selected from start 
  560. @  2    4h    Set = Scroll hard in cursor mode; Clr = Scroll soft... 
  561. @  3    8h    If set, a startup-macro-string is taken from level 2 
  562. @  4   10h    If set, errors will cause alerts 
  563. @  5   20h    If set, sound is switched off by default 
  564. @  6   40h    If set, a return-value 0 is passed back by default 
  565. @  7   80h    If set, the menu actually displayed is kept on the screen 
  566. @  8  100h    If set, QED leaves the last cursor-position on the stack 
  567.                If you set bit 6 and bit 8, two values will be passed. 
  568. #14h 
  569.  
  570. @ type    range         function 
  571. @ binary  #0-#FFFFFFFFh delay until key repeats first sec/8192 
  572. #5000d 
  573.  
  574. @ type    range         function 
  575. @ binary  #0-#FFFFFFFFh delay between key repeats     sec/8192 
  576. #700d 
  577.  
  578. @ type    range         function 
  579. @ binary  #0-#FFFFFFFFh first repeat delay in view-mode sec/8192 
  580. #10d 
  581.  
  582. @ type    range         function 
  583. @ binary  #0-#FFFFFFFFh delay between key repeats in view-mode sec/8192 
  584. #10d 
  585.  
  586. @ type    range         function 
  587. @ binary  #0-#FFFFFFFFh time until auto-quit          sec/8192 
  588. #2457600d 
  589.  
  590. @ type    range         function 
  591. @ binary  #0-#FFFFFFFFh cursor blinking-phase time (0=no blink) sec/8192 
  592. #4096d 
  593.  
  594. @ type    range         function 
  595. @ binary  #0-#FFh       The left scroll-border 
  596. #3d 
  597.  
  598. @ type    range         function 
  599. @ binary  #1-#FFh       The right scroll-border 
  600. #19d 
  601.  
  602. 2.2 Default key assignment 
  603. -------------------------- 
  604.  
  605. The 'QED.keys' file that is included in the package assigns the 
  606. keys as follows: 
  607.  
  608. Without any shifter in normal mode 
  609.  [!r1!QS] [!r2!QS] [!r3!QS] [!r4!QS] [!r5!QS] [!r6!QS] 
  610.  [ !bS  ] [ !bE  ] [ !bC  ] [ !bD  ] [ !CU  ] [ !F   ] 
  611.  [ ''!CL] [ STO  ] [ EVAL ] [ !CL  ] [ !CD  ] [ !CR  ] 
  612.  [  !S  ] [      ] [      ] [ !V   ] [  ^   ] [      ] 
  613.  [    !QS        ] [      ] [      ] [ !D   ] [ !B   ] 
  614.  [ ALPHA  ] [   7    ] [   8    ] [   9    ] [   /    ]  
  615.  [LFTSHIFT] [   4    ] [   5    ] [   6    ] [   *    ]  
  616.  [RGTSHIFT] [   1    ] [   2    ] [   3    ] [   -    ]  
  617.             [   0    ] [   .    ] [ SPACE  ] [   +    ]  
  618.  
  619. With LEFT-SHIFT shifter pressed in normal mode 
  620.  [      ] [      ] [      ] [      ] [      ] [      ] 
  621.  [ !A   ] [      ] [ !#   ] [ !j   ] [      ] [  !EN ] 
  622.  [      ] [      ] [ !O   ] [      ] [      ] [      ] 
  623.  [  !s  ] [      ] [      ] [      ] [      ] [      ] 
  624.  [     !QN       ] [      ] [      ] [      ] [      ] 
  625.  [        ] [        ] [        ] [        ] [ ()!CL  ]  
  626.  [        ] [  !J4   ] [        ] [        ] [ []!CL  ]  
  627.  [        ] [  !J1   ] [  !J2   ] [  !J3   ] [<<>>!CL ]  
  628.             [  !J0   ] [   ,    ] [        ] [ {}!CL  ]  
  629.  
  630. With RIGHT-SHIFT shifter pressed in normal mode 
  631.  [      ] [      ] [      ] [      ] [      ] [      ] 
  632.  [      ] [      ] [      ] [      ] [ !Ce  ] [  !f  ] 
  633.  [      ] [      ] [      ] [  !CB ] [ !Cb  ] [ !CE  ] 
  634.  [delta ] [INTEGR] [SUMME ] [ROOT  ] [      ] [      ] 
  635.  [  CHR$(0)      ] [      ] [      ] [      ] [  !   ] 
  636.  [        ] [        ] [        ] [        ] [   #    ]  
  637.  [        ] [  !M4   ] [        ] [        ] [   _    ]  
  638.  [        ] [  !M1   ] [  !M2   ] [  !M3   ] [ ""!CL  ]  
  639.             [  !M0   ] [CHR$(10)] [        ] [ ::!CL  ]  
  640.  
  641. Without any shifter in alpha mode 
  642.  [  A   ] [  B   ] [  C   ] [  D   ] [  E   ] [  F   ] 
  643.  [  G   ] [  H   ] [  I   ] [  J   ] [  K   ] [  L   ] 
  644.  [  M   ] [  N   ] [  O   ] [  P   ] [  Q   ] [  R   ] 
  645.  [  S   ] [  T   ] [  U   ] [  V   ] [  W   ] [  X   ] 
  646.  [   CHR$(10)    ] [  Y   ] [  Z   ] [ DEL  ] [BACKSP] 
  647.  [ ALPHA  ] [   7    ] [   8    ] [   9    ] [   /    ]  
  648.  [LFTSHIFT] [   4    ] [   5    ] [   6    ] [   *    ]  
  649.  [RGTSHIFT] [   1    ] [   2    ] [   3    ] [   -    ]  
  650.             [   0    ] [   .    ] [ SPACE  ] [   +    ]  
  651.  
  652. With LEFT-SHIFT shifter pressed in alpha mode 
  653.  [  a   ] [  b   ] [  c   ] [  d   ] [  e   ] [  f   ] 
  654.  [  g   ] [  h   ] [  i   ] [  j   ] [  k   ] [  l   ] 
  655.  [  m   ] [  n   ] [  o   ] [  p   ] [  q   ] [  r   ] 
  656.  [  s   ] [  t   ] [  u   ] [  v   ] [  w   ] [  x   ] 
  657.  [    !R         ] [  y   ] [  z   ] [ DEL  ] [BACKSP] 
  658.  [        ] [        ] [        ] [        ] [ ()!CL  ]  
  659.  [        ] [        ] [        ] [        ] [ []!CL  ]  
  660.  [        ] [  ==    ] [   <    ] [        ] [<<>>!CL ]  
  661.             [   =    ] [   ,    ] [   PI   ] [{}!CL   ]  
  662.  
  663. With RIGHT-SHIFT shifter pressed in alpha mode 
  664.  [      ] [      ] [      ] [      ] [      ] [      ] 
  665.  [      ] [      ] [      ] [      ] [      ] [      ] 
  666.  [      ] [      ] [      ] [      ] [      ] [      ] 
  667.  [      ] [      ] [      ] [      ] [      ] [      ] 
  668.  [   CHR$(0)     ] [      ] [      ] [      ] [      ] 
  669.  [        ] [        ] [        ] [        ] [   #    ]  
  670.  [        ] [        ] [        ] [        ] [   _    ]  
  671.  [        ] [NOTEQUAL] [   >    ] [        ] [   "    ]  
  672.             [   ->   ] [CHR$(10)] [ ANGLE  ] [   :    ]  
  673.  
  674. 3.0 QED Utilities 
  675. ----------------- 
  676.  
  677. Together with the main program, you should have copied a few utilities 
  678. helping you to use QED. Here is a short description: 
  679.  
  680. KEYED   Takes the QED.keys variable from the actual directory 
  681.         Leaves the changed key-list on the stack 
  682.  
  683.         KEYED let you customize the key-definitions for QED. If you 
  684.         want to use the changed list, simply "STO"re it in your 
  685.         QED.keys variable. 
  686.  
  687.         KEYED will ask you to press the key you want to redefine, then 
  688.         prompts for the definition. If you leave the definition-editor 
  689.         by choosing "EXIT" from the menu, KEYED will quit. 
  690.          
  691. SCAN.o  Is just a subroutine of KEYED. If you call SCAN.o, your calculator 
  692.         waits until you press a key, then leaves a number on the stack 
  693.         that represents QED's internal key encoding. 
  694.  
  695. KDIFF   Takes a key-list from the stack and the QED.keys variable from 
  696.          your HOME directory. 
  697.         Leaves a list on the stack that only contains the differences 
  698.          between the two lists. 
  699.  
  700.         If you have made a program that uses QED, and you wish to spread 
  701.         it to others, you should create a list that contains the 
  702.         changes to be made to the key-list when using the program. 
  703.         This lets other people enjoy their customization of the keyboard 
  704.         as well as using your program. 
  705.  
  706. KINST   Takes a key-difference-list (as made by KDIFF) and the QED.keys 
  707.          variable from your HOME directory.  
  708.         Stores the changed list to a QED.keys variable in your ACTUAL 
  709.          directory 
  710.  
  711.         KINST is ment to be the installation program for a QED key-list 
  712.         used by a program from another guy. When you have transmitted 
  713.         a directory containing the other's program, you may find a 
  714.         key-difference-list in it. ReCaLl it on the stack, then execute 
  715.         KINST and enjoy the other's tool with your standard key-assignment 
  716.         still there. 
  717.  
  718. VISIT   is just a very simple example how to substitute the internal 
  719.         slow-motion editor with QED at a special purpose. 
  720.  
  721.  
  722. Appendices 
  723. ---------- 
  724.  
  725. A.0 Version History 
  726. ------------------- 
  727.  
  728. 0.01  26-06-91   Only as a text-viewer and for test purposes. 
  729.  
  730. 0.02             Modified relocation routine 
  731.                  Added auto-quit 
  732.                  Added CursorMode 
  733.                  Added memory management to edit the text 
  734.                  Added "About" function 
  735.  
  736. 1.00a 03-07-91   First real editor, for alpha testers only 
  737.  
  738. 1.00b 05-07-91   Added a few functions like jumps 
  739.                  Removed some bugs 
  740.  
  741. 1.00c 08-07-91   Complete new key-interpretation, KEYED revision 
  742.                  Added some functions like jump-to-location, search... 
  743.                  Removed some bugs 
  744.                   
  745. 1.01  11-07-91   Added new functions: 
  746.                   Search and replace ("!E...") 
  747.                   Optional return value  ("!r0" - "!r9")  
  748.                   Optional menu-display  (look startup-flags) 
  749.                   Alert Display instruction (had been available in 0.02 
  750. former) 
  751.                  Improved command key code reading routine (no longer 
  752.                   prompts when codes are already there...) 
  753.                  Removed a bug that caused funny text when unset marks 
  754.                   were jumped to 
  755.                  A further keyboard revision: Shifters are now treated 
  756.                   nearly like the Operating-System does it 
  757.  
  758.                  Added a few utilities (KDIFF, KINST, VISIT - see chapter 3) 
  759.                  Improved the default key-list and the documentation 
  760.  
  761. 1.02  15-07-91   Removed a bug that caused funny text when scrolling left 
  762.                   in longer lines 
  763.                  Improved the "!r" function: Now you can leave real numbers 
  764.                   from 0 to 99. See key command code table 
  765.  
  766. 1.03  16-07-91   Removed a bug that caused a wrong exponent of the 
  767.                   return-value 
  768.  
  769. 1.04  27-07-91   Removed a bug that caused an "infinite result" error 
  770.                   when returning value 0 on the stack. 
  771.                  Added the left and right scroll-borders. (see QED.env) 
  772.                  Added the "!QT" instruction (see command key codes) 
  773.                  Improved the environment installation: An uncomplete 
  774.                   QED.env variable will no longer prevent QED from 
  775.                   running. Default environment is now built in. 
  776.  
  777. 1.05  11-08-91   Changed the variable recalling method: QED.font, QED.env 
  778.                   and QED.keys are now recalled by only their global name. 
  779.                   This has been done to make compression of these 
  780.                   variables using the "Redundance Fighter" possible. 
  781.                   (Use self-uncompressing model) 
  782.                   You can now also store a global name into one of 
  783.                   the three variables. 
  784.                  Changed the type of the QED.font variable: It is 
  785.                   now "Library Data" to make compression possible. 
  786.                  Added the "!CW", "!Cw", "!X<x>", "!Y" and "!y" commands - 
  787.                   please take a look at the command-key-code table 
  788.                  Added powerful macro-programming commands: 
  789.                   "!p" and "!P" (look command-key-code table) 
  790.                  A further minor keyboard revision: If you are already 
  791.                   in alpha-mode, and then press the alpha-key plus others, 
  792.                   they will still be interpreted as alpha-keys. 
  793.  
  794. 1.06  08-10-91   Rewrote the internal variable handling - the code 
  795.                   is no longer self-modifying, QED may now be placed 
  796.                   into protected RAM, ROM or libraries. 
  797.                   NOTICE: The PICT memory is used as variable 
  798.                           memory so you'll need to save the contents 
  799.                           of PICT before starting QED if neccessary. 
  800.                           If you want to put QED in a library, please 
  801.                           notice that you need to recompile programs 
  802.                           that should call QED, because the 48sx 
  803.                           distinguishes between "global names" and 
  804.                           "library names". 
  805.                  Removed a bug that caused QED to crash if it was called 
  806.                   as an on-stack-only-object. 
  807.                  Removed a dangerous routine that could have led to 
  808.                   problems in very seldom cases. 
  809.                  Reduced external memory requirements to 1688 bytes 
  810.                  Added another return-value option: last cursor position 
  811.                   can now be placed on the stack (See QED.env). 
  812.                  Improved error management slightly 
  813.                  Rechanged a feature of release 1.04: an incomplete 
  814.                   QED.env variable is no longer allowed. This led 
  815.                   only to problems. 
  816.                  Completed the 6*8 font. All characters included now. 
  817.  
  818. 1.07  09-11-91   Located a serious incompatibility to several libraries. 
  819.                   Since the demand for absolute adresses prohibited 
  820.                   other solutions, I made QED use the highest possible 
  821.                   PICT-adresses, and a check is made on startup, whether 
  822.                   QED can start in the actual configuration or not. 
  823.                   As far as I could test it, QED is now working with 
  824.                   any library on the market installed. If you get a 
  825.                   "insufficient memory" error though, please contact 
  826.                   me or use QED 1.05, wich was self-modifying... 
  827.  
  828. A.1 Features to come in the future 
  829. ---------------------------------- 
  830.  
  831. (in no order) 
  832.  
  833. - macro record function within QED 
  834. - search backwards 
  835. - complete standard font, more fonts 
  836.  
  837. B.0 Technical info 
  838. ------------------ 
  839.  
  840. Assembler source code size: about 70kB, > 6000 lines 
  841. Main-program lenght       : < 10kB 
  842. Memory usage              : requieres about 1700 byte internal data memory, 
  843.                             a copy of the original string is held in 
  844.                             memory, the work-space and the clipboard 
  845.                             are sharing the memory left. 
  846. Graphic model             : custom bit-plane, 1 hardware-screen used, 
  847.                             internal multi-font output routines, 
  848.                             second hardware-screen displayed optionally 
  849. Adress model              : position independent, non self-modifying. 
  850. System & Hardware usage   : operating system unused and blocked out. 
  851.                             direct hardware-access, no interrupts 
  852. Used development-utilities: CLASS 1.00, CLDIS 1.05, KERMIT'er 
  853.  
  854. C.0 Thanks to... 
  855. ---------------- 
  856.  
  857. I wish to say thanks to the following ones: (in alphabetical Order) 
  858.  
  859. Bretting, Thomas     for the access to the UseNet 
  860. Eberhardt, Thomas    for a detailed description of the 1.06 "bug" 
  861. Ganske, Timm         for inspiration and software-support 
  862. Heydecke, Jens       for a cheap serial-cable to the 48sx 
  863. Hirner, Ulrich       for an old but interesting book, a cheap 128kB RAM-Card 
  864. Kohl, Gilles         for some suggestions and software-support 
  865. KRAFTWERK            for the neccessary background-music 
  866. Reinke, Corinna      for a soon version E replacement 
  867. Rohrdrommel, Michael for testing from Version 0.01 on... 
  868. Rudolph, Ralf        for spreading my neverending postings... 
  869. Spell, Chris         for the marvellous hp-mail-server@seq.uncwil.edu 
  870. Zuck, Daniel         for installing the hp48_com FileEcho 
  871.  
  872. ... and everyone who sent me an offical registration. 
  873.  
  874. D.0 Adress of the author 
  875. ------------------------ 
  876.  
  877. Please send registration, any kind of feed-back, bug reports, suggestions, 
  878. hints, fonts, keymaps, HP48sx programs and so on to the following adress: 
  879.  
  880.             Lutz Vieweg 
  881.  
  882. EMAIL    :  FidoNet 2:247/30.20 
  883.             UseNet  lv@muffel.hotb.sub.org 
  884. PHONE    :  49-69-5601966 
  885. SnailMail:  Eduard-Rueppell-Strasse 12 
  886.             6000 Frankfurt am Main   1 
  887.             GERMANY 
  888. Thanks. 
  889.  
  890. If you are interested in other products from the author, especially 
  891. in the tools that were used to create QED, refer to the same adress. 
  892.  
  893. +----------------------------------------------------------------------+ 
  894.       *** EMail to:  lv@muffel.hotb.sub.org   *** 
  895.       *** FidoNet :  2:247/30.20              *** 
  896.